reviewed by: Tim Janik
authorSven Herzberg <herzi@gnome-de.org>
Mon, 27 Mar 2006 23:01:59 +0000 (23:01 +0000)
committerSven Herzberg <herzi@src.gnome.org>
Mon, 27 Mar 2006 23:01:59 +0000 (23:01 +0000)
2006-03-28  Sven Herzberg  <herzi@gnome-de.org>

        reviewed by: Tim Janik

* gtk/gtkpixmap.c: (gtk_pixmap_set): only check for equal colormaps if
the new pixmap is not NULL; fixes a warning when gtk_pixmap_set is
called from gtk_pixmap_finalize (bug 336254)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkpixmap.c

index 40eb0f77978b8a8a36c7e2cb7caf7d8c0cf826f9..cd7934b1607dac3428bea85a858f4c4f4f7d0e7d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-03-28  Sven Herzberg  <herzi@gnome-de.org>
+
+        reviewed by: Tim Janik
+       
+       * gtk/gtkpixmap.c: (gtk_pixmap_set): only check for equal colormaps if
+       the new pixmap is not NULL; fixes a warning when gtk_pixmap_set is
+       called from gtk_pixmap_finalize (bug 336254)
+
 2006-03-27  Anders Carlsson  <andersca@imendio.com>
 
         * gdk/quartz/gdkevents-quartz.c:
index 40eb0f77978b8a8a36c7e2cb7caf7d8c0cf826f9..cd7934b1607dac3428bea85a858f4c4f4f7d0e7d 100644 (file)
@@ -1,3 +1,11 @@
+2006-03-28  Sven Herzberg  <herzi@gnome-de.org>
+
+        reviewed by: Tim Janik
+       
+       * gtk/gtkpixmap.c: (gtk_pixmap_set): only check for equal colormaps if
+       the new pixmap is not NULL; fixes a warning when gtk_pixmap_set is
+       called from gtk_pixmap_finalize (bug 336254)
+
 2006-03-27  Anders Carlsson  <andersca@imendio.com>
 
         * gdk/quartz/gdkevents-quartz.c:
index e9680d2eb37912678c10bfcf1a780d694e13a8fc..0b1d48261eb07ac326e854e34ea85c4aa492fd83 100644 (file)
@@ -131,7 +131,8 @@ gtk_pixmap_set (GtkPixmap *pixmap,
   gint oldheight;
 
   g_return_if_fail (GTK_IS_PIXMAP (pixmap));
-  g_return_if_fail (gdk_colormap_get_visual (gtk_widget_get_colormap (GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth (GDK_DRAWABLE (val)));
+  if(GDK_IS_DRAWABLE(val))
+    g_return_if_fail (gdk_colormap_get_visual (gtk_widget_get_colormap (GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth (GDK_DRAWABLE (val)));
 
   if (pixmap->pixmap != val)
     {